package edu.example;
import java.util.Vector;

import javax.swing.table.AbstractTableModel;

class AssignTableModel extends AbstractTableModel 
{
	private String[] columnNames = {"Select", "Name", "Assign Review", "Research Area", "Workload", "Avaliable"};
	private Vector<Object[]> rowData = new Vector<Object[]>();
	
	public AssignTableModel(Vector<Object[]> initRowData){
		rowData = initRowData;
	}
	
	public int 		getColumnCount() 								{return columnNames.length;}
	public String 	getColumnName(int column) 						{return columnNames[column];}
	public int 		getRowCount() 									{return rowData.size();}
	public Object 	getValueAt(int row, int column)					{return rowData.get(row)[column];}
	public Class 	getColumnClass(int column) 						{return (getValueAt(0, column).getClass());}
	public void 	setValueAt(Object value, int row, int column)	{rowData.get(row)[column] = value;}
	
	/*public boolean 	isCellEditable(int row, int column) 
	{
		if(column == 0 || column == 4 || column == 5)
		{
			return true;
		}
		return false;
	}
	*/
}